var Equitment= Window.extend({
	beaker1:null,
	beaker2:null,
	beaker3:null,
	beaker4:null,
	beaker5:null,
	vessel:null,
	vessel1:null,
	bottle:null,
	lid:null,
	count:1,
	flow:null,
	parent:null,
	runningAction:null,
	runningAction:null,
	status:true,
	ctor:function (parent,flow, tag) {
		this._super(parent,flow, tag);
		this.flow=flow;
		this.parent=parent;
		var fontDef = new cc.FontDefinition();
		fontDef.fontName = "Arial";
		fontDef.fontSize = "8";
		fontDef.fillStyle=cc.color(0, 0, 0,255);

		this.beaker5=new Button(this.rootNode,2,TAG_ITEM_BEAKER5,
				"#equitment/beaker.png",this.eventMenuCallback,this);
		this.beaker5.setPosition(gg.c_width*0.6,gg.c_height*1.1);
		this.label5=new Button(this.beaker5,10,TAG_ITEM_BEAKER5,"#equitment/label5.png",this.eventMenuCallback,this);
		this.label5.setPosition(cc.p(this.beaker5.width*0.5,this.beaker5.height*0.2));
		this.label5_1=new cc.LabelTTF("待测液4",fontDef);
		this.rootNode.addChild(this.label5_1,1);
		this.label5_1.setPosition(cc.p(gg.c_width*0.6,gg.c_height*0.85));
		
		this.beaker4=new Button(this.rootNode,2,TAG_ITEM_BEAKER4,
				"#equitment/beaker.png",this.eventMenuCallback,this);
		this.beaker4.setPosition(gg.c_width*0.7,gg.c_height*1.1);
		this.label4=new Button(this.beaker4,10,TAG_ITEM_BEAKER4,"#equitment/label4.png",this.eventMenuCallback,this);
		this.label4.setPosition(cc.p(this.beaker4.width*0.5,this.beaker4.height*0.2));
		this.label4_1=new cc.LabelTTF("待测液3",fontDef);
		this.rootNode.addChild(this.label4_1,1);
		this.label4_1.setPosition(cc.p(gg.c_width*0.7,gg.c_height*0.85));
		
		this.beaker3=new Button(this.rootNode,2,TAG_ITEM_BEAKER3,
				"#equitment/beaker.png",this.eventMenuCallback,this);
		this.beaker3.setPosition(gg.c_width*0.8,gg.c_height*1.1);
		this.label3=new Button(this.beaker3,10,TAG_ITEM_BEAKER3,"#equitment/label3.png",this.eventMenuCallback,this);
		this.label3.setPosition(cc.p(this.beaker3.width*0.5,this.beaker3.height*0.2));
		this.label3_1=new cc.LabelTTF("待测液2",fontDef);
		this.rootNode.addChild(this.label3_1,1);
		this.label3_1.setPosition(cc.p(gg.c_width*0.8,gg.c_height*0.85));
		
		this.beaker2=new Button(this.rootNode,2,TAG_ITEM_BEAKER2,
				"#equitment/beaker.png",this.eventMenuCallback,this);
		this.beaker2.setPosition(gg.c_width*0.9,gg.c_height*1.1);
		this.label2=new Button(this.beaker2,10,TAG_ITEM_BEAKER2,"#equitment/label2.png",this.eventMenuCallback,this);
		this.label2.setPosition(cc.p(this.beaker2.width*0.5,this.beaker2.height*0.2));
		this.label2_1=new cc.LabelTTF("待测液1",fontDef);
		this.rootNode.addChild(this.label2_1,1);
		this.label2_1.setPosition(cc.p(gg.c_width*0.9,gg.c_height*0.85));
		
		this.beaker1=new Button(this.rootNode,2,TAG_ITEM_BEAKER1,
				"#equitment/beaker.png",this.eventMenuCallback,this);
		this.beaker1.setPosition(gg.c_width,gg.c_height*1.1);
		this.label1=new Button(this.beaker1,10,TAG_ITEM_BEAKER1,"#equitment/label1.png",this.eventMenuCallback,this);
		this.label1.setPosition(cc.p(this.beaker1.width*0.5,this.beaker1.height*0.2));
		this.label1_1=new cc.LabelTTF("蒸馏水",fontDef);
		this.rootNode.addChild(this.label1_1,1);
		this.label1_1.setPosition(cc.p(gg.c_width,gg.c_height*0.85));
		
		this.vessel=new Button(this.rootNode,2,TAG_ITEM_VESSEL_1,
				"#equitment/vessel.png",this.eventMenuCallback,this);
		this.vessel.setPosition(gg.c_width*1.18, gg.c_height*1.05);
		this.lid=new Button(this.rootNode,2,TAG_ITEM_LID,
				"#equitment/lid.png",this.eventMenuCallback,this);
		this.lid.setPosition(gg.c_width*1.4, gg.c_height*1.2);
		this.bottle=new Button(this.rootNode,2,TAG_ITEM_BOTTLE,
				"#equitment/bottle.png",this.eventMenuCallback,this);
		this.bottle.setPosition(gg.c_width*1.4, gg.c_height*1.08);
		this.vessel1=new Button(this.rootNode,2,TAG_ITEM_VESSEL3,
				"#equitment/vessel1.png",this.eventMenuCallback,this);
		this.vessel1.setPosition(gg.c_width*1.12, gg.c_height*0.6);
		this.vessel1.setAnchorPoint(cc.p(0.5, 0.6));
		this.vessel1.setVisible(false);
		this.line=new Button(this.vessel1,3,TAG_ITEM_LINE,
				"#equitment/line.png",this.eventMenuCallback,this);
		this.line.setPosition(this.vessel1.width*0.5,this.vessel1.height*0.15);
		
		this.vessel2=new Button(this.rootNode,2,TAG_ITEM_VESSEL4,
				"#equitment/vessel1.png",this.eventMenuCallback,this);
		this.vessel2.setPosition(gg.c_width*1.25, gg.c_height*0.6);
		this.vessel2.setAnchorPoint(cc.p(0.5, 0.6));
		this.vessel2.setVisible(false);
		
		this.line1=new Button(this.vessel2,3,TAG_ITEM_LINE1,
				"#equitment/line.png",this.eventMenuCallback,this);
		this.line1.setPosition(this.vessel2.width*0.5,this.vessel2.height*0.15);
		
		this.num=new Button(this.rootNode,2,TAG_ITEM_NUM,"#equitment/num.png",this.eventMenuCallback,this);
		this.num.setPosition(gg.c_width*1.1,gg.c_height*1.3);
		this.num.setOpacity(0);
		
//		this.flow_left=new Button(this.rootNode,2,TAG_ITEM_FLOW,"#equitment/flow_left.png",this.eventMenuCallback,this);
//		this.flow_left.setPosition(gg.c_width*1.251, gg.c_height*0.623);
//		this.flow_left.setOpacity(0);
//
//		this.flow_right=new Button(this.bottle,2,TAG_ITEM_FLOWRIGHT,"#equitment/flow_right.png",this.eventMenuCallback,this);
//		this.flow_right.setPosition(this.bottle.width*0.2,this.bottle.height*0.98);
//		this.flow_right.setAnchorPoint(cc.p(1, 1));
		
		this.label=new cc.LabelTTF("对容量瓶进行检漏,润洗吸量管用吸量管吸取溶液转移入容量瓶中",gg.fontName,gg.fontSize);
		this.label.setColor(cc.color(0, 0, 0, 255));
		this.label.setPosition(cc.p(gg.c_width, gg.c_height*1.5));
		this.rootNode.addChild(this.label);
		
		this.label1=new cc.LabelTTF("检查吸收池配套性,测定吸收池的透射比，两吸收池偏差应小于0.5%",gg.fontName,gg.fontSize);
		this.label1.setPosition(cc.p(gg.c_width, gg.c_height*1.5));
		this.label1.setColor(cc.color(0, 0, 0, 255));
		this.label1.setVisible(false);
		this.rootNode.addChild(this.label1);
		
		this.label2=new cc.LabelTTF("台面整理、废物和废液处理",gg.fontName,gg.fontSize);
		this.label2.setPosition(cc.p(gg.c_width, gg.c_height*1.5));
		this.label2.setColor(cc.color(0, 0, 0, 255));
		this.label2.setVisible(false);
		this.rootNode.addChild(this.label2);
		
		this.initAction();
		this.initAction1();
		this.initAction2();
	},
	fadeoutLabel:function(){
		var fadeout=cc.fadeOut(1);
		this.label.runAction(fadeout);
	},
	fadeoutLabel1:function(){
		var fadeout=cc.fadeOut(1);
		this.label1.runAction(fadeout);
	},
	fadeoutLabel2:function(){
		var fadeout=cc.fadeOut(1);
		this.label2.runAction(fadeout);
	},
	initAction:function(){
		var animFrames=[];
		for(var i=1;i<7;i++){
			var str="equitment/beaker"+i+".png";
			var frame=cc.spriteFrameCache.getSpriteFrame(str);
			animFrames.push(frame);
		}
		var animation=new cc.Animation(animFrames,0.1)//1.4
		this.runningAction=cc.repeat(cc.animate(animation),1);
		this.runningAction.retain();
	},
	initAction1:function(){
		var animFrames=[];
		for(var i=1;i<6;i++){
			var str="equitment/bottle"+i+".png";
			var frame=cc.spriteFrameCache.getSpriteFrame(str);
			animFrames.push(frame);
		}
		var animation=new cc.Animation(animFrames,0.15)//0.6
		this.runningAction1=cc.repeat(cc.animate(animation),1);
		this.runningAction1.retain();
	},
	initAction2:function(){
		var animFrames=[];
		for(var i=1;i<9;i++){
			var str="equitment/vesselaction_"+i+".png";
			var frame=cc.spriteFrameCache.getSpriteFrame(str);
			animFrames.push(frame);
		}
		var animation=new cc.Animation(animFrames,0.15)
		this.runningAction2=cc.repeat(cc.animate(animation),1);
		this.runningAction2.retain();
	},
	eventMenuCallback:function(pSender){
		this.showDesc(pSender.getTag());
		if(cur_tool != TAG_BUTTON_HAND){
			// 描述
			return;
		}
		if(!this.flow.checkTag(pSender.getTag())){
			// 是否可以触发
				_.error();
				ll.tip_layer.updateScore(gg.score);
			return;
		} else {
			if(this.status==true){
				_.clever();
			ll.tip_layer.updateScore(gg.score);
			}
		}
		var action = this.flow.flow.action;
		var func = cc.callFunc(this.close, this);
		var func1=cc.callFunc(this.checkActionDone,this);
		var func2=cc.callFunc(function(){
			this.flow.next();
			this.status=true;
		},this);
		switch (pSender.getTag()) {
		case TAG_ITEM_LID:
			var ber=cc.bezierBy(1, [cc.p(30,30),cc.p(50,40),cc.p(55,-50)]);
			var rotate=cc.rotateBy(1, 180);
			if(this.status==true){
				this.status=false;
				pSender.runAction(cc.sequence(cc.callFunc(function() {
					this.fadeoutLabel();
				}, this),cc.spawn(ber,rotate),func2));
			}
			break;
		case TAG_ITEM_BEAKER1:
			if(this.status==true){
				this.status=false;
				if(action==ACTION_DO1){
					this.rock(func1,pSender,null,func2);
				}else if(action==ACTION_DO2){
					this.pour3(func1,pSender,func,func2);
					this.parent.vessel1.setSpriteFrame("equitment/vessel2.png");
				}
			}
			break;
		case TAG_ITEM_BEAKER2:
			if(this.status==true){
				this.status=false;
				if(action==ACTION_DO1){
					this.rock(func1,pSender,null,func2);
				}else if(action==ACTION_DO2){
					var action1=cc.moveTo(0.5,cc.p(gg.c_width*1.22, gg.c_height*0.75));
					var action2=cc.rotateTo(1,95.0);
					var action3=cc.rotateTo(1,0);
					var action4=cc.moveTo(0.5,cc.p(pSender.getPosition()));
					pSender.runAction(cc.sequence(cc.callFunc(function(){
						this.pour3(func1,pSender,null,cc.delayTime(1));
					},this),cc.delayTime(3),cc.callFunc(function() {
						this.pourVessel();
					}, this),cc.delayTime(2),cc.callFunc(function() {
						this.pourBeaker(this.beaker2);
					}, this),cc.delayTime(5),func,cc.delayTime(0.5),func2));
				}else if(action==ACTION_DO3){
					this.pour3(func1,pSender, func,func2);
				}
			}
			break;
		case TAG_ITEM_BEAKER3:
			if(this.status==true){
				this.status=false;
				if(action==ACTION_DO1){
					this.rock(func1,pSender,null,func2);
				}else if(action==ACTION_DO2){
					pSender.runAction(cc.sequence(cc.callFunc(function() {
						this.pour3(func1,pSender,null,cc.delayTime(1));
					}, this),cc.delayTime(3),cc.callFunc(function() {
						this.pourVessel();
					}, this),cc.delayTime(2),cc.callFunc(function() {
						this.pourBeaker(this.beaker3);
					}, this),cc.delayTime(5),func,cc.delayTime(0.5),func2));
				}else if(action==ACTION_DO3){
					this.pour3(func1,pSender, func,func2);
				}
			}
			break;
		case TAG_ITEM_BEAKER4:
			if(this.status==true){
				this.status=false;
				if(action==ACTION_DO1){
					this.rock(func1,pSender,null,func2);
				}else if(action==ACTION_DO2){
					pSender.runAction(cc.sequence(cc.callFunc(function() {
						this.pour3(func1,pSender,null,cc.delayTime(1));
					}, this),cc.delayTime(3),cc.callFunc(function() {
						this.pourVessel();
					}, this),cc.delayTime(2),cc.callFunc(function() {
						this.pourBeaker(this.beaker4);
					}, this),cc.delayTime(5),func,cc.delayTime(0.5),func2));
				}else if(action==ACTION_DO3){
					this.pour3(func1,pSender, func,func2);
				}
			}
			break;
		case TAG_ITEM_BEAKER5:
			if(this.status==true){
				this.status=false;
				if(action==ACTION_DO1){
					this.rock(func1,pSender,null,func2);
				}else if(action==ACTION_DO2){
					pSender.runAction(cc.sequence(cc.callFunc(function() {
						this.pour3(func1,pSender,null,cc.delayTime(1));
					}, this),cc.delayTime(4),cc.callFunc(function() {
						this.pourVessel();
					}, this),cc.delayTime(2),cc.callFunc(function() {
						this.pourBeaker(this.beaker5);
					}, this),cc.delayTime(5),func,cc.delayTime(0.5),func2));
				}else if(action==ACTION_DO3){
					this.pour3(func1,pSender, func,func2);
				}
			}
			break;
		case TAG_ITEM_VESSEL_1:
				if(action==ACTION_DO1){
					this.flow.next();
					this.vessel.setSpriteFrame("equitment/vessel_1.png");
					this.vessel1.setVisible(true);
					this.parent.vessel.setVisible(true);
				}else if(action==ACTION_DO2){
					pSender.runAction(cc.sequence(cc.callFunc(function() {
						this.vessel.setSpriteFrame("equitment/vessel_2.png");
						this.vessel2.setVisible(true);
						this.parent.vessel1.setVisible(true);
						this.label1.setVisible(true);
						this.line1.setVisible(false);
					}, this),cc.delayTime(2),cc.callFunc(function() {
						this.fadeoutLabel1();
					}, this),func,func2));
				}
			break;
		case TAG_ITEM_BOTTLE:
			var moveto=cc.moveTo(1,cc.p(gg.c_width*1.4, gg.c_height*1.08));
			var ber=cc.bezierBy(2, [cc.p(-50,50),cc.p(-100,80),cc.p(-160,70)]);
			var ber1=cc.bezierBy(2, [cc.p(-50,50),cc.p(-100,80),cc.p(-210,70)]);
			var ber2=cc.bezierBy(2, [cc.p(-50,50),cc.p(-100,80),cc.p(-260,70)]);
			var ber3=cc.bezierBy(2, [cc.p(-50,50),cc.p(-100,80),cc.p(-310,70)]);
			var ber4=cc.bezierBy(2, [cc.p(-50,50),cc.p(-100,80),cc.p(-360,70)]);
			var func3=cc.callFunc(function(){
				var fadein=cc.fadeIn(1);
				var fadeout=cc.fadeOut(1);
				this.num.runAction(cc.sequence(fadein,cc.delayTime(1),fadeout));
			},this);
			if(this.status==true){
				this.status=false;
				if(action==ACTION_DO1){
					pSender.runAction(cc.sequence(ber,cc.spawn(this.runningAction1,cc.sequence(cc.delayTime(0.2),cc.callFunc(function() {
						this.beaker1.runAction(this.runningAction);
					},this))),func1,cc.callFunc(function(){
						this.num.setPosition(gg.c_width*1.05,gg.c_height*1.3);
					},this),func3,this.runningAction1.reverse(),moveto,cc.delayTime(1),cc.callFunc(function() {
						this.rock(this.beaker1);
					}, this),cc.delayTime(1),func2));
				}else if(action==ACTION_DO7){
					this.pour2(func1,pSender,action,func,func2);
					this.parent.vessel.setSpriteFrame("equitment/vessel2.png");
				}else if(action==ACTION_DO8){
					pSender.runAction(cc.sequence(cc.callFunc(function() {
						this.pour2(func1,pSender,action,null,cc.delayTime(1));
					}, this),cc.delayTime(3),cc.callFunc(function() {
						this.pour4(this.vessel2,func,func2);
					}, this)));
					
				}else if(action==ACTION_DO2){
					pSender.runAction(cc.sequence(ber1,cc.spawn(this.runningAction1,cc.sequence(cc.delayTime(0.2),cc.callFunc(function() {
						this.beaker2.runAction(this.runningAction);
					},this))),func1,cc.callFunc(function() {
						this.num.setPosition(gg.c_width*0.95,gg.c_height*1.3);
					}, this),func3,this.runningAction1.reverse(),moveto,cc.delayTime(1),cc.callFunc(function() {
						this.rock(this.beaker2);
					}, this),cc.delayTime(1),func2));
				}else if(action==ACTION_DO3){
					pSender.runAction(cc.sequence(ber2,cc.spawn(this.runningAction1,cc.sequence(cc.delayTime(0.2),cc.callFunc(function() {
						this.beaker3.runAction(this.runningAction);
					},this))),func1,cc.callFunc(function() {
						this.num.setPosition(gg.c_width*0.85,gg.c_height*1.3);
					},this),func3,this.runningAction1.reverse(),moveto,cc.delayTime(1),cc.callFunc(function() {
						this.rock(this.beaker3);
					}, this),cc.delayTime(1),func2));
				}else if(action==ACTION_DO4){
					pSender.runAction(cc.sequence(ber3,cc.spawn(this.runningAction1,cc.sequence(cc.delayTime(0.2),cc.callFunc(function() {
						this.beaker4.runAction(this.runningAction);
					},this))),func1,cc.callFunc(function() {
						this.num.setPosition(gg.c_width*0.75,gg.c_height*1.3);
					}, this),func3,this.runningAction1.reverse(),moveto,cc.delayTime(1),cc.callFunc(function() {
						this.rock(this.beaker4);
					}, this),cc.delayTime(1),func2));
				}else if(action==ACTION_DO5){
					pSender.runAction(cc.sequence(ber4,cc.spawn(this.runningAction1,cc.sequence(cc.delayTime(0.2),cc.callFunc(function() {
						this.beaker5.runAction(this.runningAction);
					},this))),func1,cc.callFunc(function() {
						this.num.setPosition(gg.c_width*0.65,gg.c_height*1.3);
					},this),func3,this.runningAction1.reverse(),moveto,cc.delayTime(1),cc.callFunc(function(){
						this.parent.equit.setSpriteFrame("equitment/equit_1.png");
					}, this),cc.callFunc(function() {
						this.rock(this.beaker5);
					}, this),cc.delayTime(1),func2));
				}
			}
			break;
		case TAG_ITEM_VESSEL4:
			if(this.status==true){
				this.status=false;
				if(action==ACTION_DO3){
					this.pour4(pSender,null,func2);
				}else if(action==ACTION_DO4){
					this.pour4(pSender,func,func2);
				}else if(action==ACTION_DO5){
					pSender.runAction(cc.sequence(cc.callFunc(function() {
						this.label2.setVisible(true)
						this.pour4(pSender,null,func2);
					}, this)));
				}
			}
			break;
		default:
			break;
		}
	},
	rock:function(pSender){
		var rotate=cc.rotateBy(0.15,6);
		var rotate1=cc.rotateBy(0.15,-6);
		var seq=cc.sequence(rotate,rotate1).repeat(4);
		pSender.setAnchorPoint(cc.p(0.5, 0.7));
		var yy = pSender.getPosition().y * 1.1;
		pSender.setPositionY(yy);
		pSender.runAction(seq);
	},
	pour1:function(func1,pSender){
			var action1=cc.moveBy(0.5,cc.p(-gg.c_width*0.1,0));
			var action2=cc.rotateTo(1,-95.0);
			var action3=cc.rotateTo(1,0);
			var moveto=cc.moveTo(1,cc.p(gg.c_width*1.4, gg.c_height*1.08));
			pSender.runAction(cc.sequence(action1,action2,action3,moveto,func1));
	},
	pour2:function(func1,pSender,action,func,func2){
		var action1=cc.moveTo(0.5,cc.p(gg.c_width*1.2, gg.c_height*0.75));
		var action2=cc.rotateTo(1,-95.0);
		var action3=cc.rotateTo(1,0);
		var action4=cc.moveTo(1,cc.p(gg.c_width*1.4, gg.c_height*1.08));
		var action5=cc.moveTo(0.5,cc.p(gg.c_width*1.33, gg.c_height*0.75));
		var moveto=cc.moveTo(1,cc.p(gg.c_width*1.4, gg.c_height*1.08));
		if(action==ACTION_DO5||action==ACTION_DO8){
			pSender.runAction(cc.sequence(action5,cc.spawn(action2,cc.sequence(cc.delayTime(0.8),func1)),action3,action4,func2));
		}else if(action==ACTION_DO7||action==ACTION_DO2){
			pSender.runAction(cc.sequence(action1,cc.spawn(action2,cc.sequence(cc.delayTime(0.8),func1)),action3,action4,func,cc.delayTime(0.5),func2));
		}
	},
	pourBeaker:function(pSender){
		var action1=cc.moveTo(0.5,cc.p(gg.c_width*1.22, gg.c_height*0.75));
		var action2=cc.rotateTo(1,95.0);
		var action3=cc.rotateTo(1,0);
		var action4=cc.moveTo(0.5,cc.p(pSender.getPosition()));
		pSender.runAction(cc.sequence(cc.callFunc(function(){
			this.line1.setVisible(true);
			this.line1.setPosition(this.vessel2.width*0.5,this.vessel2.height*0.15);
		}, this),action1,action2,cc.spawn(cc.delayTime(1),cc.callFunc(function() {
			var fadein=cc.fadeIn(1);
		},this)),cc.callFunc(function() {
			this.checkActionDone(pSender);
		}, this),cc.spawn(action3,cc.callFunc(function() {
			var fadeout=cc.fadeOut(1);
		},this)),action4));
	},
	pourBeaker1:function(pSender){
		var action1=cc.moveTo(0.5,cc.p(gg.c_width*1.22, gg.c_height*0.75));
		var action2=cc.rotateTo(1,95.0);
		var action3=cc.rotateTo(1,0);
		var action4=cc.moveTo(0.5,cc.p(pSender.getPosition()));
		pSender.runAction(cc.sequence(cc.callFunc(function(){
			this.line1.setVisible(true);
			this.line1.setPosition(this.vessel2.width*0.5,this.vessel2.height*0.15);
		}, this),action1,action2,cc.spawn(cc.delayTime(0.2),cc.callFunc(function() {
			var fadein=cc.fadeIn(1);
		},this)),cc.callFunc(function() {
			this.checkActionDone(pSender);
		}, this),cc.spawn(action3,cc.callFunc(function() {
			var fadeout=cc.fadeOut(1);
		},this)),action4));
	},
	pour3:function(func1,pSender,func,func2){
		if(pSender.getParent().getTag()==pSender.getTag()){
			pSender=pSender.getParent();
		}
		if(func!=null){
			var action1=cc.moveTo(0.5,cc.p(gg.c_width*1.22, gg.c_height*0.75));
			var action2=cc.rotateTo(1,95.0);
			var action3=cc.rotateTo(1,0);
			var action4=cc.moveTo(0.5,cc.p(pSender.getPosition()));
			pSender.runAction(cc.sequence(cc.callFunc(function(){
				this.line1.setVisible(true);
				this.line1.setPosition(this.vessel2.width*0.5,this.vessel2.height*0.15);
			}, this),action1,action2,cc.spawn(cc.delayTime(1),cc.callFunc(function() {
				var fadein=cc.fadeIn(1);
			},this)),func1,cc.spawn(action3,cc.callFunc(function() {
				var fadeout=cc.fadeOut(1);
			},this)),action4,func,cc.delayTime(0.5),func2));
		}else{
			var action1=cc.moveTo(0.5,cc.p(gg.c_width*1.22, gg.c_height*0.75));
			var action2=cc.rotateTo(1,95.0);
			var action3=cc.rotateTo(1,0);
			var action4=cc.moveTo(0.5,cc.p(pSender.getPosition()));
			pSender.runAction(cc.sequence(cc.callFunc(function(){
				this.line1.setVisible(true);
				this.line1.setPosition(this.vessel2.width*0.5,this.vessel2.height*0.15);
			}, this),action1,action2,cc.spawn(cc.delayTime(0.2),cc.callFunc(function() {
				var fadein=cc.fadeIn(1);
			},this)),func1,cc.spawn(action3,cc.callFunc(function() {
				var fadeout=cc.fadeOut(1);
			},this)),action4,func2));
		}
	},
	pourVessel:function(){
		this.vessel2.runAction(cc.sequence(cc.callFunc(function(){
			this.line1.setVisible(false);
		},this),this.runningAction2,cc.delayTime(2),cc.callFunc(function() {
			this.fadeoutLabel2();
		}, this)));
	},
	pourVessel1:function(){
		this.vessel2.runAction(cc.sequence(cc.callFunc(function(){
			this.line1.setVisible(false);
		},this),this.runningAction2));
	},
	pour4:function(pSender,func,func2){
		if(func!=null){
			pSender.runAction(cc.sequence(cc.callFunc(function(){
				this.line1.setVisible(false);
			},this),cc.callFunc(function(){
				pSender.runAction(this.runningAction2);
			},this),cc.delayTime(2),cc.callFunc(function() {
				this.fadeoutLabel2();
			}, this),func,cc.delayTime(0.5),func2));
		}else{
			pSender.runAction(cc.sequence(cc.callFunc(function(){
				this.line1.setVisible(false);
			},this),cc.callFunc(function(){
				pSender.runAction(this.runningAction2);
			},this),cc.delayTime(2),func2));
		}
	},
	checkActionDone:function(pSender){
		var tag=pSender.getTag();
		var action = this.flow.flow.action;
		if(tag==TAG_ITEM_BEAKER1){
			if(action!=ACTION_DO1){
				var move=cc.moveTo(1.5,cc.p(this.vessel2.width*0.5,this.vessel2.height*0.75));
				this.line1.runAction(move);
			}
		}else if(tag==TAG_ITEM_BEAKER2){
			if(action!=ACTION_DO1){
				var move=cc.moveTo(1.5,cc.p(this.vessel2.width*0.5,this.vessel2.height*0.75));
				this.line1.runAction(move);
			}
		}else if(tag==TAG_ITEM_BEAKER3){
			if(action!=ACTION_DO1){
				var move=cc.moveTo(1.5,cc.p(this.vessel2.width*0.5,this.vessel2.height*0.75));
				this.line1.runAction(move);
			}
		}else if(tag==TAG_ITEM_BEAKER4){
			if(action!=ACTION_DO1){
				var move=cc.moveTo(1.5,cc.p(this.vessel2.width*0.5,this.vessel2.height*0.75));
				this.line1.runAction(move);
			}
		}else if(tag==TAG_ITEM_BEAKER5){
			if(action!=ACTION_DO1){
				var move=cc.moveTo(1.5,cc.p(this.vessel2.width*0.5,this.vessel2.height*0.75));
				this.line1.runAction(move);
			}
		}else if(tag==TAG_ITEM_BOTTLE){
			if(action==ACTION_DO1){
				this.beaker1.setSpriteFrame("equitment/beaker6.png");
			}else if(action==ACTION_DO2){
				this.beaker2.setSpriteFrame("equitment/beaker6.png");
			}else if(action==ACTION_DO3){
				this.beaker3.setSpriteFrame("equitment/beaker6.png");
			}else if(action==ACTION_DO4){
				this.beaker4.setSpriteFrame("equitment/beaker6.png");
			}else if(action==ACTION_DO5){
				this.beaker5.setSpriteFrame("equitment/beaker6.png");
			}else if(action==ACTION_DO7){
				var move=cc.moveTo(1.5,cc.p(this.vessel1.width*0.5,this.vessel1.height*0.75));
				this.line.runAction(move);
			}else if(action==ACTION_DO8){
				var move=cc.moveTo(1.5,cc.p(this.vessel2.width*0.5,this.vessel2.height*0.75));
				this.line1.setVisible(true);
				this.line1.setPosition(this.vessel2.width*0.5,this.vessel2.height*0.15);
				this.line1.runAction(move);
			}
		}
	}
});